package com.mimiwang.comment.dao;

import com.mimiwang.comment.entity.Comment;
import com.mimiwang.comment.vo.CommentVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @AUTHOR:游李滨
 * @DATE:2023/5/2 16:32
 */

@Mapper
@Repository
public interface CommentDao {

//    根据id查询评论,以及发送者和接收者信息,不查子评论集合
    CommentVo selectCommentVoById(long id);
    List<Comment> selectCommentListBySenderId(long senderId);
    List<Comment> selectCommentListByReceiverId(long receiverId);
    List<CommentVo> selectChildCommentListByParentId(long parentId);
    int insertComment(Comment comment);
    int deleteComment(int commentId);
}
